<!DOCTYPE html>
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>test.sieve</title>
<meta name="generator" content="KF5::SyntaxHighlighting (Sieve)"/>
</head><body style="color:#1f1c1b"><pre>
<span style="color:#898887;"># Sieve syntax highlighting test</span>
<span style="color:#898887;"># see RFC 5228</span>

<span style="color:#898887;"># comments §2.3.</span>

<span style="color:#898887;"># Single line with alerts </span><span style="color:#ca9219;background-color:#451e1a;font-weight:bold;">TODO</span><span style="color:#898887;"> </span><span style="color:#81ca2d;background-color:#f7e6e6;font-weight:bold;">###</span>
<span style="color:#898887;">/*</span>
<span style="color:#898887;"> Multiline comment with alerts </span><span style="color:#ca9219;background-color:#451e1a;font-weight:bold;">FIXME</span>
<span style="color:#898887;"> this also should be folding region</span>
<span style="color:#898887;"> */</span>

<span style="color:#898887;"># literal data §2.4.</span>
<span style="color:#898887;"># numbers §2.4.1.</span>
<span style="color:#b08000;">42</span>
<span style="color:#b08000;">100K</span>
<span style="color:#b08000;">10M</span>
<span style="color:#b08000;">3G</span>

<span style="color:#898887;"># strings §2.4.2.</span>
<span style="color:#bf0303;">&quot;string&quot;</span>
<span style="color:#bf0303;">&quot;string</span><span style="color:#924c9d;">\n</span><span style="color:#bf0303;">with</span><span style="color:#924c9d;">\&quot;</span><span style="color:#bf0303;">special chars&quot;</span>
<span style="color:#898887;"># not a string</span>
<span style="color:#bf0303;">&quot;multi \</span>
<span style="color:#bf0303;"> line \</span>
<span style="color:#bf0303;"> #with</span><span style="color:#924c9d;">\a</span><span style="color:#bf0303;"> \</span>
<span style="color:#bf0303;"> continuation&quot;</span>
<span style="color:#898887;"># not a string</span>
<span style="color:#bf0303;">text:</span>
<span style="color:#bf0303;">Multiline</span>
<span style="color:#bf0303;">string</span><span style="color:#924c9d;">\&quot;</span><span style="color:#bf0303;"> &quot;with quotes&quot;</span>
<span style="color:#bf0303;">or # comments</span>
<span style="color:#bf0303;">this should also be a folding region</span>
<span style="color:#bf0303;">.dot</span>
<span style="color:#bf0303;">..dot</span>
<span style="color:#bf0303;">dotstuffed dot:</span>
<span style="color:#bf0303;">..</span>
<span style="color:#bf0303;">ending with a single .</span>
<span style="color:#bf0303;">.</span>

<span style="color:#898887;"># encoded characters §2.4.2.4.</span>
<span style="color:#898887;"># valid</span>
<span style="color:#bf0303;">&quot;$</span><span style="color:#924c9d;">${hex:24 24}</span><span style="color:#bf0303;">&quot;</span>
<span style="color:#bf0303;">&quot;</span><span style="color:#924c9d;">${unicode:40}</span><span style="color:#bf0303;">&quot;</span>
<span style="color:#bf0303;">&quot;$</span><span style="color:#924c9d;">${hex:40}</span><span style="color:#bf0303;">&quot;</span>
<span style="color:#bf0303;">&quot;</span><span style="color:#924c9d;">${hex: da }</span><span style="color:#bf0303;">&quot;</span>
<span style="color:#bf0303;">&quot;</span><span style="color:#924c9d;">${hex:FE }</span><span style="color:#bf0303;">&quot;</span>
<span style="color:#bf0303;">&quot;</span><span style="color:#924c9d;">${HEX: 40}</span><span style="color:#bf0303;">&quot;</span>
<span style="color:#bf0303;">&quot;</span><span style="color:#924c9d;">${unicode:40}</span><span style="color:#bf0303;">&quot;</span>
<span style="color:#bf0303;">&quot;</span><span style="color:#924c9d;">${UNICODE:40}</span><span style="color:#bf0303;">&quot;</span>
<span style="color:#bf0303;">&quot;</span><span style="color:#924c9d;">${UnICoDE:0000040}</span><span style="color:#bf0303;">&quot;</span>
<span style="color:#bf0303;">&quot;</span><span style="color:#924c9d;">${Unicode:ff}</span><span style="color:#bf0303;">&quot;</span>
<span style="color:#898887;">#invalid</span>
<span style="color:#bf0303;">&quot;${hex:40&quot;</span>
<span style="color:#bf0303;">&quot;${hex:4</span><span style="color:#924c9d;">${hex:30}</span><span style="color:#bf0303;">}&quot;</span>
<span style="color:#bf0303;">&quot;${ unicode:40}&quot;</span>
<span style="color:#bf0303;">&quot;${Unicode:Cool}&quot;</span>
<span style="color:#898887;"># semantic errors, syntactically correct</span>
<span style="color:#bf0303;">&quot;</span><span style="color:#924c9d;">${hex:400}</span><span style="color:#bf0303;">&quot;</span>
<span style="color:#bf0303;">&quot;</span><span style="color:#924c9d;">${unicode:200000}</span><span style="color:#bf0303;">&quot;</span>
<span style="color:#bf0303;">&quot;</span><span style="color:#924c9d;">${Unicode:DF01}</span><span style="color:#bf0303;">&quot;</span>

<span style="color:#898887;"># test lists §2.5.1</span>
<span style="font-weight:bold;">if</span> <span style="color:#644a9b;font-weight:bold;">anyof</span> (<span style="color:#644a9b;font-weight:bold;">not</span> <span style="color:#644a9b;font-weight:bold;">exists</span> [<span style="color:#bf0303;">&quot;From&quot;</span>, <span style="color:#bf0303;">&quot;Date&quot;</span>],
          <span style="color:#644a9b;font-weight:bold;">header</span> <span style="color:#0095ff;font-weight:bold;">:contains</span> <span style="color:#bf0303;">&quot;from&quot;</span> <span style="color:#bf0303;">&quot;fool@example.com&quot;</span>) {
    <span style="color:#644a9b;">discard</span>;
}
<span style="font-weight:bold;">if</span> <span style="color:#644a9b;font-weight:bold;">allof</span> (<span style="color:#644a9b;font-weight:bold;">not</span> <span style="color:#644a9b;font-weight:bold;">exists</span> [<span style="color:#bf0303;">&quot;From&quot;</span>, <span style="color:#bf0303;">&quot;Date&quot;</span>],
          <span style="color:#644a9b;font-weight:bold;">header</span> <span style="color:#0095ff;font-weight:bold;">:contains</span> <span style="color:#bf0303;">&quot;from&quot;</span> <span style="color:#bf0303;">&quot;fool@example.com&quot;</span>) {
    <span style="color:#644a9b;">discard</span>;
}

<span style="color:#898887;"># match types §2.7.1.</span>
<span style="color:#0095ff;font-weight:bold;">:contains</span>
<span style="color:#0095ff;font-weight:bold;">:matches</span>
<span style="color:#0095ff;font-weight:bold;">:is</span>

<span style="color:#898887;"># comparators §2.7.3.</span>
<span style="font-weight:bold;">if</span> <span style="color:#644a9b;font-weight:bold;">header</span> <span style="color:#0095ff;font-weight:bold;">:contains</span> <span style="color:#006e28;">:comparator</span> <span style="color:#bf0303;">&quot;i;octet&quot;</span> <span style="color:#bf0303;">&quot;Subject&quot;</span> <span style="color:#bf0303;">&quot;MAKE MONEY FAST&quot;</span> {
    <span style="color:#644a9b;">discard</span>;
}

<span style="color:#898887;"># comparison against addresses §2.7.4.</span>
<span style="color:#006e28;">:localpart</span>
<span style="color:#006e28;">:domain</span>
<span style="color:#006e28;">:all</span>

<span style="color:#898887;"># commands §2.9.</span>
<span style="color:#644a9b;">keep</span>;
<span style="color:#644a9b;">fileinto</span> <span style="color:#bf0303;">&quot;inbox.bla&quot;</span>;
<span style="color:#644a9b;">redirect</span> <span style="color:#bf0303;">&quot;test@kde.org&quot;</span>;
<span style="color:#644a9b;">discard</span>;

<span style="color:#898887;"># control if §3.1.</span>
<span style="color:#898887;"># this also should create folding regions</span>
<span style="font-weight:bold;">if</span> <span style="color:#644a9b;font-weight:bold;">header</span> <span style="color:#0095ff;font-weight:bold;">:contains</span> <span style="color:#bf0303;">&quot;from&quot;</span> <span style="color:#bf0303;">&quot;foo&quot;</span> {
    <span style="color:#644a9b;">discard</span>;
} <span style="font-weight:bold;">elsif</span> <span style="color:#644a9b;font-weight:bold;">header</span> <span style="color:#0095ff;font-weight:bold;">:contains</span> [<span style="color:#bf0303;">&quot;subject&quot;</span>] [<span style="color:#bf0303;">&quot;$$$&quot;</span>] {
    <span style="color:#644a9b;">discard</span>;
} <span style="font-weight:bold;">else</span> {
    <span style="color:#644a9b;">fileinto</span> <span style="color:#bf0303;">&quot;INBOX&quot;</span>;
}

<span style="color:#898887;"># control require §3.2.</span>
<span style="font-weight:bold;">require</span> <span style="color:#bf0303;">&quot;fileinto&quot;</span>;
<span style="font-weight:bold;">require</span> [<span style="color:#bf0303;">&quot;vacation&quot;</span>, <span style="color:#bf0303;">&quot;imapflags&quot;</span>];

<span style="color:#898887;"># control stop §3.3.</span>
<span style="color:#644a9b;">stop</span>;

<span style="color:#898887;"># test commands §5.</span>
<span style="color:#644a9b;font-weight:bold;">address</span>
<span style="color:#644a9b;font-weight:bold;">allof</span>
<span style="color:#644a9b;font-weight:bold;">anyof</span>
<span style="color:#644a9b;font-weight:bold;">exists</span>
<span style="color:#644a9b;font-weight:bold;">false</span>
<span style="color:#644a9b;font-weight:bold;">header</span>
<span style="color:#644a9b;font-weight:bold;">not</span>
<span style="color:#644a9b;font-weight:bold;">size</span>
<span style="color:#644a9b;font-weight:bold;">true</span>

<span style="color:#898887;"># test address §5.1.</span>
<span style="font-weight:bold;">if</span> <span style="color:#644a9b;font-weight:bold;">address</span> <span style="color:#0095ff;font-weight:bold;">:is</span> <span style="color:#006e28;">:all</span> <span style="color:#bf0303;">&quot;from&quot;</span> <span style="color:#bf0303;">&quot;kde@example.com&quot;</span> {
    <span style="color:#644a9b;">discard</span>;
} <span style="font-weight:bold;">elsif</span> <span style="color:#644a9b;font-weight:bold;">address</span> <span style="color:#006e28;">:domain</span> <span style="color:#0095ff;font-weight:bold;">:is</span> [<span style="color:#bf0303;">&quot;From&quot;</span>, <span style="color:#bf0303;">&quot;To&quot;</span>] <span style="color:#bf0303;">&quot;example.com&quot;</span> { <span style="color:#898887;"># comment</span>
    <span style="color:#644a9b;">keep</span>; <span style="color:#898887;"># comment</span>
}

<span style="color:#898887;"># test envelope §5.4.</span>
<span style="font-weight:bold;">if</span> <span style="color:#644a9b;font-weight:bold;">envelope</span> <span style="color:#006e28;">:all</span> <span style="color:#0095ff;font-weight:bold;">:is</span> <span style="color:#bf0303;">&quot;from&quot;</span> <span style="color:#bf0303;">&quot;kde@example.com&quot;</span> {
    <span style="color:#644a9b;">discard</span>;
}

<span style="color:#898887;"># test exists §5.5.</span>
<span style="font-weight:bold;">if</span> <span style="color:#644a9b;font-weight:bold;">not</span> <span style="color:#644a9b;font-weight:bold;">exists</span> [<span style="color:#bf0303;">&quot;From&quot;</span>,<span style="color:#bf0303;">&quot;Date&quot;</span>] {
    <span style="color:#644a9b;">discard</span>;
}

<span style="color:#898887;"># test header §5.7.</span>
<span style="color:#644a9b;font-weight:bold;">not</span> <span style="color:#644a9b;font-weight:bold;">header</span> <span style="color:#0095ff;font-weight:bold;">:matches</span> <span style="color:#bf0303;">&quot;Cc&quot;</span> <span style="color:#bf0303;">&quot;?*&quot;</span>

<span style="color:#898887;"># test size §5.9.</span>
<span style="font-weight:bold;">if</span> <span style="color:#644a9b;font-weight:bold;">size</span> <span style="color:#006e28;">:over</span> <span style="color:#b08000;">500K</span> { <span style="color:#644a9b;">discard</span>; }
<span style="font-weight:bold;">if</span> <span style="color:#644a9b;font-weight:bold;">size</span> <span style="color:#006e28;">:under</span> <span style="color:#b08000;">1M</span> { <span style="color:#644a9b;">keep</span>; } <span style="font-weight:bold;">else</span> { <span style="color:#644a9b;">discard</span>; }


<span style="color:#898887;">/*</span>
<span style="color:#898887;"> * Extensions</span>
<span style="color:#898887;"> * see https://www.iana.org/assignments/sieve-extensions/sieve-extensions.xhtml</span>
<span style="color:#898887;"> */</span>

<span style="color:#898887;"># Body RFC5173</span>
<span style="color:#006e28;">:raw</span>
<span style="color:#006e28;">:content</span>
<span style="color:#006e28;">:text</span>
<span style="font-weight:bold;">if</span> <span style="color:#644a9b;font-weight:bold;">body</span> <span style="color:#006e28;">:raw</span> <span style="color:#0095ff;font-weight:bold;">:contains</span> <span style="color:#bf0303;">&quot;MAKE MONEY FAST&quot;</span> {
    <span style="color:#644a9b;">discard</span>;
}
<span style="font-weight:bold;">if</span> <span style="color:#644a9b;font-weight:bold;">body</span> <span style="color:#006e28;">:content</span> <span style="color:#bf0303;">&quot;text&quot;</span> <span style="color:#0095ff;font-weight:bold;">:contains</span> [<span style="color:#bf0303;">&quot;bla&quot;</span>, <span style="color:#bf0303;">&quot;blub&quot;</span>] {
    <span style="color:#644a9b;">fileinto</span> <span style="color:#bf0303;">&quot;inbox.foo&quot;</span>;
}

<span style="color:#898887;"># Convert RFC6558</span>
<span style="font-weight:bold;">require</span> [<span style="color:#bf0303;">&quot;convert&quot;</span>];
<span style="color:#644a9b;">convert</span> <span style="color:#bf0303;">&quot;image/tiff&quot;</span> <span style="color:#bf0303;">&quot;image/jpeg&quot;</span> [<span style="color:#bf0303;">&quot;pix-x=320&quot;</span>,<span style="color:#bf0303;">&quot;pix-y=240&quot;</span>];

<span style="color:#898887;"># Copy RFC3894</span>
<span style="font-weight:bold;">require</span> [<span style="color:#bf0303;">&quot;copy&quot;</span>, <span style="color:#bf0303;">&quot;fileinto&quot;</span>];
<span style="color:#644a9b;">fileinto</span> <span style="color:#006e28;">:copy</span> <span style="color:#bf0303;">&quot;incoming&quot;</span>;

<span style="color:#898887;"># Date RFC5260</span>
<span style="font-weight:bold;">require</span> [<span style="color:#bf0303;">&quot;date&quot;</span>, <span style="color:#bf0303;">&quot;relational&quot;</span>, <span style="color:#bf0303;">&quot;fileinto&quot;</span>];
<span style="font-weight:bold;">if</span> <span style="color:#644a9b;font-weight:bold;">allof</span>(<span style="color:#644a9b;font-weight:bold;">header</span> <span style="color:#0095ff;font-weight:bold;">:is</span> <span style="color:#bf0303;">&quot;from&quot;</span> <span style="color:#bf0303;">&quot;boss@example.com&quot;</span>,
         <span style="color:#644a9b;font-weight:bold;">date</span> <span style="color:#0095ff;font-weight:bold;">:value</span> <span style="color:#bf0303;">&quot;ge&quot;</span> <span style="color:#006e28;">:originalzone</span> <span style="color:#bf0303;">&quot;date&quot;</span> <span style="color:#bf0303;">&quot;hour&quot;</span> <span style="color:#bf0303;">&quot;09&quot;</span>,
         <span style="color:#644a9b;font-weight:bold;">date</span> <span style="color:#0095ff;font-weight:bold;">:value</span> <span style="color:#bf0303;">&quot;lt&quot;</span> <span style="color:#006e28;">:originalzone</span> <span style="color:#bf0303;">&quot;date&quot;</span> <span style="color:#bf0303;">&quot;hour&quot;</span> <span style="color:#bf0303;">&quot;17&quot;</span>)
    { <span style="color:#644a9b;">fileinto</span> <span style="color:#bf0303;">&quot;urgent&quot;</span>; }
<span style="font-weight:bold;">if</span> <span style="color:#644a9b;font-weight:bold;">anyof</span>(<span style="color:#644a9b;font-weight:bold;">date</span> <span style="color:#0095ff;font-weight:bold;">:is</span> <span style="color:#bf0303;">&quot;received&quot;</span> <span style="color:#bf0303;">&quot;weekday&quot;</span> <span style="color:#bf0303;">&quot;0&quot;</span>,
         <span style="color:#644a9b;font-weight:bold;">date</span> <span style="color:#0095ff;font-weight:bold;">:is</span> <span style="color:#bf0303;">&quot;received&quot;</span> <span style="color:#bf0303;">&quot;weekday&quot;</span> <span style="color:#bf0303;">&quot;6&quot;</span>)
{ <span style="color:#644a9b;">fileinto</span> <span style="color:#bf0303;">&quot;weekend&quot;</span>; }
<span style="font-weight:bold;">if</span> <span style="color:#644a9b;font-weight:bold;">anyof</span>(<span style="color:#644a9b;font-weight:bold;">currentdate</span> <span style="color:#0095ff;font-weight:bold;">:is</span> <span style="color:#bf0303;">&quot;weekday&quot;</span> <span style="color:#bf0303;">&quot;0&quot;</span>,
         <span style="color:#644a9b;font-weight:bold;">currentdate</span> <span style="color:#0095ff;font-weight:bold;">:is</span> <span style="color:#bf0303;">&quot;weekday&quot;</span> <span style="color:#bf0303;">&quot;6&quot;</span>,
         <span style="color:#644a9b;font-weight:bold;">currentdate</span> <span style="color:#0095ff;font-weight:bold;">:value</span> <span style="color:#bf0303;">&quot;lt&quot;</span> <span style="color:#bf0303;">&quot;hour&quot;</span> <span style="color:#bf0303;">&quot;09&quot;</span>,
         <span style="color:#644a9b;font-weight:bold;">currentdate</span> <span style="color:#0095ff;font-weight:bold;">:value</span> <span style="color:#bf0303;">&quot;ge&quot;</span> <span style="color:#bf0303;">&quot;hour&quot;</span> <span style="color:#bf0303;">&quot;17&quot;</span>)
{ <span style="color:#644a9b;">redirect</span> <span style="color:#bf0303;">&quot;pager@example.com&quot;</span>; }
<span style="font-weight:bold;">if</span> <span style="color:#644a9b;font-weight:bold;">allof</span>(<span style="color:#644a9b;font-weight:bold;">currentdate</span> <span style="color:#0095ff;font-weight:bold;">:value</span> <span style="color:#bf0303;">&quot;ge&quot;</span> <span style="color:#bf0303;">&quot;date&quot;</span> <span style="color:#bf0303;">&quot;2007-06-30&quot;</span>,
         <span style="color:#644a9b;font-weight:bold;">currentdate</span> <span style="color:#0095ff;font-weight:bold;">:value</span> <span style="color:#bf0303;">&quot;le&quot;</span> <span style="color:#bf0303;">&quot;date&quot;</span> <span style="color:#bf0303;">&quot;2007-07-07&quot;</span>)
{ <span style="color:#644a9b;">vacation</span> <span style="color:#006e28;">:days</span> <span style="color:#b08000;">7</span>  <span style="color:#bf0303;">&quot;I'm away during the first week in July.&quot;</span>; }

<span style="font-weight:bold;">require</span> [<span style="color:#bf0303;">&quot;date&quot;</span>, <span style="color:#bf0303;">&quot;variables&quot;</span>, <span style="color:#bf0303;">&quot;fileinto&quot;</span>];
<span style="font-weight:bold;">if</span> <span style="color:#644a9b;font-weight:bold;">currentdate</span> <span style="color:#0095ff;font-weight:bold;">:matches</span> <span style="color:#bf0303;">&quot;month&quot;</span> <span style="color:#bf0303;">&quot;*&quot;</span> { <span style="color:#644a9b;">set</span> <span style="color:#bf0303;">&quot;month&quot;</span> <span style="color:#bf0303;">&quot;</span><span style="color:#0057ae;">${1}</span><span style="color:#bf0303;">&quot;</span>; }
<span style="font-weight:bold;">if</span> <span style="color:#644a9b;font-weight:bold;">currentdate</span> <span style="color:#0095ff;font-weight:bold;">:matches</span> <span style="color:#bf0303;">&quot;year&quot;</span>  <span style="color:#bf0303;">&quot;*&quot;</span> { <span style="color:#644a9b;">set</span> <span style="color:#bf0303;">&quot;year&quot;</span>  <span style="color:#bf0303;">&quot;</span><span style="color:#0057ae;">${1}</span><span style="color:#bf0303;">&quot;</span>; }
<span style="color:#644a9b;">fileinto</span> <span style="color:#bf0303;">&quot;</span><span style="color:#0057ae;">${month}</span><span style="color:#bf0303;">-</span><span style="color:#0057ae;">${year}</span><span style="color:#bf0303;">&quot;</span>;

<span style="font-weight:bold;">require</span> [<span style="color:#bf0303;">&quot;variables&quot;</span>, <span style="color:#bf0303;">&quot;date&quot;</span>, <span style="color:#bf0303;">&quot;editheader&quot;</span>];
<span style="font-weight:bold;">if</span> <span style="color:#644a9b;font-weight:bold;">currentdate</span> <span style="color:#0095ff;font-weight:bold;">:matches</span> <span style="color:#bf0303;">&quot;std11&quot;</span> <span style="color:#bf0303;">&quot;*&quot;</span> {<span style="color:#644a9b;">addheader</span> <span style="color:#bf0303;">&quot;Processing-date&quot;</span> <span style="color:#bf0303;">&quot;</span><span style="color:#0057ae;">${0}</span><span style="color:#bf0303;">&quot;</span>;}

<span style="font-weight:bold;">require</span> [<span style="color:#bf0303;">&quot;date&quot;</span>, <span style="color:#bf0303;">&quot;relational&quot;</span>, <span style="color:#bf0303;">&quot;index&quot;</span>];
<span style="font-weight:bold;">if</span> <span style="color:#644a9b;font-weight:bold;">date</span> <span style="color:#0095ff;font-weight:bold;">:value</span> <span style="color:#bf0303;">&quot;gt&quot;</span> <span style="color:#006e28;">:index</span> <span style="color:#b08000;">2</span> <span style="color:#006e28;">:zone</span> <span style="color:#bf0303;">&quot;-0500&quot;</span> <span style="color:#bf0303;">&quot;received&quot;</span> <span style="color:#bf0303;">&quot;iso8601&quot;</span> <span style="color:#bf0303;">&quot;2007-02-26T09:00:00-05:00&quot;</span>
{ <span style="color:#644a9b;">redirect</span> <span style="color:#bf0303;">&quot;aftercutoff@example.org&quot;</span>; }

<span style="font-weight:bold;">if</span> <span style="color:#644a9b;font-weight:bold;">header</span> <span style="color:#006e28;">:index</span> <span style="color:#b08000;">1</span> <span style="color:#0095ff;font-weight:bold;">:matches</span> <span style="color:#bf0303;">&quot;received&quot;</span> <span style="color:#bf0303;">&quot;*(* [*.*.*.*])*&quot;</span> {}

<span style="color:#898887;"># Duplicate RFC7352</span>
<span style="font-weight:bold;">require</span> [<span style="color:#bf0303;">&quot;duplicate&quot;</span>, <span style="color:#bf0303;">&quot;variables&quot;</span>];
<span style="font-weight:bold;">if</span> <span style="color:#644a9b;font-weight:bold;">duplicate</span> { <span style="color:#644a9b;">discard</span>; }
<span style="font-weight:bold;">if</span> <span style="color:#644a9b;font-weight:bold;">duplicate</span> <span style="color:#006e28;">:header</span> <span style="color:#bf0303;">&quot;message-id&quot;</span> { <span style="color:#644a9b;">discard</span>; }
<span style="font-weight:bold;">if</span> <span style="color:#644a9b;font-weight:bold;">header</span> <span style="color:#0095ff;font-weight:bold;">:matches</span> <span style="color:#bf0303;">&quot;message-id&quot;</span> <span style="color:#bf0303;">&quot;*&quot;</span> {
    <span style="font-weight:bold;">if</span> <span style="color:#644a9b;font-weight:bold;">duplicate</span> <span style="color:#006e28;">:uniqueid</span> <span style="color:#bf0303;">&quot;</span><span style="color:#0057ae;">${0}</span><span style="color:#bf0303;">&quot;</span> { <span style="color:#644a9b;">discard</span>; }
}

<span style="color:#898887;"># Editheader RFC5293</span>
<span style="color:#644a9b;">addheader</span> <span style="color:#bf0303;">&quot;X-Hello&quot;</span> <span style="color:#bf0303;">&quot;World&quot;</span>;
<span style="color:#644a9b;">deleteheader</span> <span style="color:#006e28;">:index</span> <span style="color:#b08000;">1</span> <span style="color:#bf0303;">&quot;X-Hello&quot;</span>;

<span style="color:#898887;"># Enclose RFC5703</span>
<span style="color:#006e28;">:mime</span>
<span style="color:#006e28;">:anychild</span>
<span style="color:#006e28;">:type</span>
<span style="color:#006e28;">:subtype</span>
<span style="color:#006e28;">:contenttype</span>
<span style="color:#006e28;">:param</span>
<span style="color:#644a9b;">replace</span>
<span style="color:#644a9b;">enclose</span>
<span style="color:#644a9b;">extracttext</span>
<span style="font-weight:bold;">if</span> <span style="color:#644a9b;font-weight:bold;">header</span> <span style="color:#006e28;">:mime</span> <span style="color:#006e28;">:type</span> <span style="color:#bf0303;">&quot;Content-Type&quot;</span> <span style="color:#bf0303;">&quot;image&quot;</span> {}
<span style="color:#644a9b;">replace</span> <span style="color:#bf0303;">&quot;Executable attachment removed by user filter&quot;</span>;
<span style="font-weight:bold;">foreverypart</span> {
    <span style="font-weight:bold;">if</span> <span style="color:#644a9b;font-weight:bold;">header</span> <span style="color:#006e28;">:mime</span> <span style="color:#006e28;">:param</span> <span style="color:#bf0303;">&quot;filename&quot;</span> <span style="color:#0095ff;font-weight:bold;">:matches</span> [<span style="color:#bf0303;">&quot;Content-Type&quot;</span>, <span style="color:#bf0303;">&quot;Content-Disposition&quot;</span>]
        [<span style="color:#bf0303;">&quot;*.com&quot;</span>, <span style="color:#bf0303;">&quot;*.exe&quot;</span>, <span style="color:#bf0303;">&quot;*.vbs&quot;</span>, <span style="color:#bf0303;">&quot;*.scr&quot;</span>, <span style="color:#bf0303;">&quot;*.pif&quot;</span>, <span style="color:#bf0303;">&quot;*.hta&quot;</span>, <span style="color:#bf0303;">&quot;*.bat&quot;</span>, <span style="color:#bf0303;">&quot;*.zip&quot;</span> ] {
        <span style="color:#898887;"># these attachment types are executable</span>
        <span style="color:#644a9b;">enclose</span> <span style="color:#006e28;">:subject</span> <span style="color:#bf0303;">&quot;Warning&quot;</span> <span style="color:#bf0303;">text:</span>
<span style="color:#bf0303;">WARNING! The enclosed message contains executable attachments.</span>
<span style="color:#bf0303;">These attachment types may contain a computer virus program</span>
<span style="color:#bf0303;">that can infect your computer and potentially damage your data.</span>
<span style="color:#bf0303;">.</span>
;
        <span style="color:#644a9b;">break</span>;
    }
}
<span style="color:#644a9b;">extracttext</span> <span style="color:#006e28;">:first</span> <span style="color:#b08000;">100</span> <span style="color:#bf0303;">&quot;msgcontent&quot;</span>;

<span style="color:#898887;"># Notify RFC5435</span>
<span style="color:#644a9b;">notify</span> <span style="color:#006e28;">:importance</span> <span style="color:#bf0303;">&quot;1&quot;</span> <span style="color:#006e28;">:message</span> <span style="color:#bf0303;">&quot;This is probably very important&quot;</span> <span style="color:#bf0303;">&quot;mailto:kde@example.com&quot;</span>;
<span style="color:#644a9b;">notify</span> <span style="color:#006e28;">:message</span> <span style="color:#bf0303;">&quot;</span><span style="color:#0057ae;">${from_addr}${env_from}</span><span style="color:#bf0303;">: </span><span style="color:#0057ae;">${subject}</span><span style="color:#bf0303;">&quot;</span> <span style="color:#bf0303;">&quot;mailto:kde@example.com&quot;</span>;
<span style="font-weight:bold;">if</span> <span style="color:#644a9b;font-weight:bold;">not</span> <span style="color:#644a9b;font-weight:bold;">valid_notify_method</span> [<span style="color:#bf0303;">&quot;mailto:&quot;</span>, <span style="color:#bf0303;">&quot;http://gw.example.net/notify?test&quot;</span>] { <span style="color:#644a9b;">stop</span>; }
<span style="font-weight:bold;">if</span> <span style="color:#644a9b;font-weight:bold;">notify_method_capability</span> <span style="color:#bf0303;">&quot;xmpp:tim@example.com?message;subject=SIEVE&quot;</span> <span style="color:#bf0303;">&quot;Online&quot;</span> <span style="color:#bf0303;">&quot;yes&quot;</span> {}
<span style="color:#644a9b;">set</span> <span style="color:#006e28;">:encodeurl</span> <span style="color:#bf0303;">&quot;body_param&quot;</span> <span style="color:#bf0303;">&quot;stuff&quot;</span>;

<span style="color:#898887;"># Envelope DSN RFC6009</span>
<span style="font-weight:bold;">if</span> <span style="color:#644a9b;font-weight:bold;">envelope</span> <span style="color:#bf0303;">&quot;notify&quot;</span> <span style="color:#bf0303;">&quot;SUCCESS&quot;</span> {}
<span style="font-weight:bold;">if</span> <span style="color:#644a9b;font-weight:bold;">allof</span> (<span style="color:#644a9b;font-weight:bold;">envelope</span> <span style="color:#bf0303;">&quot;notify&quot;</span> <span style="color:#bf0303;">&quot;FAILURE&quot;</span>, <span style="color:#644a9b;font-weight:bold;">envelope</span> <span style="color:#006e28;">:comparator</span> <span style="color:#bf0303;">&quot;i;ascii-numeric&quot;</span> <span style="color:#0095ff;font-weight:bold;">:count</span> <span style="color:#bf0303;">&quot;eq&quot;</span> <span style="color:#bf0303;">&quot;notify&quot;</span> <span style="color:#bf0303;">&quot;1&quot;</span>) {}
<span style="font-weight:bold;">if</span> <span style="color:#644a9b;font-weight:bold;">envelope</span> <span style="color:#0095ff;font-weight:bold;">:matches</span> <span style="color:#bf0303;">&quot;orcpt&quot;</span> <span style="color:#bf0303;">&quot;rfc822;*@example.com&quot;</span> {}
<span style="font-weight:bold;">if</span> <span style="color:#644a9b;font-weight:bold;">anyof</span> (<span style="color:#644a9b;font-weight:bold;">envelope</span> <span style="color:#0095ff;font-weight:bold;">:contains</span> <span style="color:#bf0303;">&quot;bytimerelative&quot;</span> <span style="color:#bf0303;">&quot;-&quot;</span>, <span style="color:#644a9b;font-weight:bold;">envelope</span> <span style="color:#0095ff;font-weight:bold;">:value</span> <span style="color:#bf0303;">&quot;eq&quot;</span> <span style="color:#006e28;">:comparator</span> <span style="color:#bf0303;">&quot;i;ascii-numeric&quot;</span> <span style="color:#bf0303;">&quot;bytimerelative&quot;</span> <span style="color:#bf0303;">&quot;0&quot;</span>) {}
<span style="color:#644a9b;">redirect</span> <span style="color:#006e28;">:copy</span> <span style="color:#006e28;">:notify</span> <span style="color:#bf0303;">&quot;NEVER&quot;</span> <span style="color:#bf0303;">&quot;elsewhere@example.com&quot;</span>;
<span style="color:#644a9b;">redirect</span> <span style="color:#006e28;">:copy</span> <span style="color:#006e28;">:bytimerelative</span> <span style="color:#b08000;">600</span> <span style="color:#bf0303;">&quot;cellphone@example.com&quot;</span>;
<span style="color:#644a9b;">redirect</span> <span style="color:#006e28;">:copy</span> <span style="color:#006e28;">:bytimeabsolute</span> <span style="color:#bf0303;">&quot;</span><span style="color:#0057ae;">${date}</span><span style="color:#bf0303;">T20:00:00</span><span style="color:#0057ae;">${zone}</span><span style="color:#bf0303;">&quot;</span> <span style="color:#006e28;">:bymode</span> <span style="color:#bf0303;">&quot;return&quot;</span> <span style="color:#bf0303;">&quot;cellphone@example.com&quot;</span>;

<span style="color:#898887;"># Environment RFC5183</span>
<span style="font-weight:bold;">if</span> <span style="color:#644a9b;font-weight:bold;">environment</span> <span style="color:#0095ff;font-weight:bold;">:contains</span> <span style="color:#bf0303;">&quot;item&quot;</span> <span style="color:#bf0303;">&quot;&quot;</span> {}

<span style="color:#898887;"># Reject RFC5429</span>
<span style="color:#644a9b;">ereject</span> <span style="color:#bf0303;">&quot;I no longer accept mail from this address&quot;</span>;
<span style="color:#644a9b;">reject</span> <span style="color:#bf0303;">text:</span>
<span style="color:#bf0303;">Your message is too big.  If you want to send me a big attachment,</span>
<span style="color:#bf0303;">put it on a public web site and send me a URL.</span>
<span style="color:#bf0303;">.</span>
;

<span style="color:#898887;"># External Lists RFC6134</span>
<span style="font-weight:bold;">if</span> <span style="color:#644a9b;font-weight:bold;">envelope</span> <span style="color:#006e28;">:list</span> <span style="color:#bf0303;">&quot;from&quot;</span> <span style="color:#bf0303;">&quot;:addrbook:default&quot;</span> {}
<span style="font-weight:bold;">if</span> <span style="color:#644a9b;font-weight:bold;">currentdate</span> <span style="color:#006e28;">:list</span> <span style="color:#bf0303;">&quot;date&quot;</span> <span style="color:#bf0303;">&quot;tag:example.com,2011-01-01:localHolidays&quot;</span> {}
<span style="font-weight:bold;">if</span> <span style="color:#644a9b;font-weight:bold;">allof</span> (<span style="color:#644a9b;font-weight:bold;">envelope</span> <span style="color:#006e28;">:detail</span> <span style="color:#bf0303;">&quot;to&quot;</span> <span style="color:#bf0303;">&quot;mylist&quot;</span>, <span style="color:#644a9b;font-weight:bold;">header</span> <span style="color:#006e28;">:list</span> <span style="color:#bf0303;">&quot;from&quot;</span> <span style="color:#bf0303;">&quot;tag:example.com,2010-05-28:mylist&quot;</span>) {
    <span style="color:#644a9b;">redirect</span> <span style="color:#006e28;">:list</span> <span style="color:#bf0303;">&quot;tag:example.com,2010-05-28:mylist&quot;</span>;
}
<span style="font-weight:bold;">if</span> <span style="color:#644a9b;font-weight:bold;">string</span> <span style="color:#006e28;">:list</span> <span style="color:#bf0303;">&quot;</span><span style="color:#0057ae;">${ip}</span><span style="color:#bf0303;">&quot;</span> <span style="color:#bf0303;">&quot;tag:example.com,2011-04-10:DisallowedIPs&quot;</span> {}
<span style="font-weight:bold;">if</span> <span style="color:#644a9b;font-weight:bold;">header</span> <span style="color:#006e28;">:mime</span> <span style="color:#006e28;">:param</span> <span style="color:#bf0303;">&quot;filename&quot;</span> <span style="color:#006e28;">:list</span> [<span style="color:#bf0303;">&quot;Content-Type&quot;</span>, <span style="color:#bf0303;">&quot;Content-Disposition&quot;</span>] <span style="color:#bf0303;">&quot;tag:example.com,2011-04-10:BadFileNameExts&quot;</span> {}

<span style="color:#898887;"># ihave RFC5463</span>
<span style="font-weight:bold;">if</span> <span style="color:#644a9b;font-weight:bold;">ihave</span> <span style="color:#bf0303;">&quot;fileinto&quot;</span> {}
<span style="color:#644a9b;">error</span> <span style="color:#bf0303;">&quot;failed!&quot;</span>;

<span style="color:#898887;"># IMAP Sieve RFC6785</span>
<span style="font-weight:bold;">if</span> <span style="color:#644a9b;font-weight:bold;">anyof</span> (<span style="color:#644a9b;font-weight:bold;">environment</span> <span style="color:#0095ff;font-weight:bold;">:is</span> <span style="color:#bf0303;">&quot;imap.cause&quot;</span> <span style="color:#bf0303;">&quot;APPEND&quot;</span>, <span style="color:#644a9b;font-weight:bold;">environment</span> <span style="color:#0095ff;font-weight:bold;">:is</span> <span style="color:#bf0303;">&quot;imap.cause&quot;</span> <span style="color:#bf0303;">&quot;COPY&quot;</span>)  {
    <span style="font-weight:bold;">if</span> <span style="color:#644a9b;font-weight:bold;">environment</span> <span style="color:#0095ff;font-weight:bold;">:is</span> <span style="color:#bf0303;">&quot;imap.mailbox&quot;</span> <span style="color:#bf0303;">&quot;ActionItems&quot;</span> {
        <span style="color:#644a9b;">redirect</span> <span style="color:#006e28;">:copy</span> <span style="color:#bf0303;">&quot;actionitems@example.com&quot;</span>;
    }
}

<span style="color:#898887;"># IMAP4 Flags RFC5232</span>
<span style="color:#644a9b;">setflag</span> <span style="color:#bf0303;">&quot;</span><span style="color:#924c9d;">\\</span><span style="color:#bf0303;">Deleted&quot;</span>;
<span style="color:#644a9b;">setflag</span> <span style="color:#bf0303;">&quot;flagvar&quot;</span> <span style="color:#bf0303;">&quot;</span><span style="color:#924c9d;">\\</span><span style="color:#bf0303;">Flagged&quot;</span>;
<span style="color:#644a9b;">addflag</span> <span style="color:#bf0303;">&quot;flagvar&quot;</span> <span style="color:#bf0303;">&quot;</span><span style="color:#924c9d;">\\</span><span style="color:#bf0303;">Deleted&quot;</span>;
<span style="color:#644a9b;">addflag</span> <span style="color:#bf0303;">&quot;flagvar&quot;</span> [<span style="color:#bf0303;">&quot;</span><span style="color:#924c9d;">\\</span><span style="color:#bf0303;">Deleted&quot;</span>, <span style="color:#bf0303;">&quot;</span><span style="color:#924c9d;">\\</span><span style="color:#bf0303;">Answered&quot;</span>];
<span style="color:#644a9b;">removeflag</span> <span style="color:#bf0303;">&quot;flagvar&quot;</span> <span style="color:#bf0303;">&quot;$MDNRequired&quot;</span>;
<span style="color:#644a9b;font-weight:bold;">hasflag</span> <span style="color:#0095ff;font-weight:bold;">:contains</span> <span style="color:#bf0303;">&quot;MyVar&quot;</span> <span style="color:#bf0303;">&quot;Junk&quot;</span>
<span style="color:#644a9b;font-weight:bold;">hasflag</span> <span style="color:#0095ff;font-weight:bold;">:contains</span> <span style="color:#bf0303;">&quot;</span><span style="color:#0057ae;">${MyVar}</span><span style="color:#bf0303;">&quot;</span> [<span style="color:#bf0303;">&quot;label&quot;</span>, <span style="color:#bf0303;">&quot;forward&quot;</span>]
<span style="color:#644a9b;font-weight:bold;">hasflag</span> <span style="color:#0095ff;font-weight:bold;">:count</span> <span style="color:#bf0303;">&quot;ge&quot;</span> <span style="color:#006e28;">:comparator</span> <span style="color:#bf0303;">&quot;i;ascii-numeric&quot;</span> <span style="color:#bf0303;">&quot;MyFlags&quot;</span> <span style="color:#b08000;">2</span>
<span style="color:#644a9b;">fileinto</span> <span style="color:#006e28;">:flags</span> <span style="color:#bf0303;">&quot;</span><span style="color:#924c9d;">\\</span><span style="color:#bf0303;">Deleted&quot;</span> <span style="color:#bf0303;">&quot;INBOX.bla&quot;</span>;

<span style="color:#898887;"># Include RFC6609</span>
<span style="color:#644a9b;">include</span> <span style="color:#006e28;">:personal</span> <span style="color:#bf0303;">&quot;always_allow&quot;</span>;
<span style="color:#644a9b;">include</span> <span style="color:#006e28;">:global</span> <span style="color:#bf0303;">&quot;spam_tests&quot;</span>;
<span style="color:#644a9b;">return</span>;
<span style="font-weight:bold;">global</span> <span style="color:#bf0303;">&quot;i_am_on_vacation&quot;</span>;
<span style="color:#644a9b;">set</span> <span style="color:#bf0303;">&quot;global.i_am_on_vacation&quot;</span> <span style="color:#bf0303;">&quot;1&quot;</span>;

<span style="color:#898887;"># Mailbox RFC5490</span>
<span style="font-weight:bold;">if</span> <span style="color:#644a9b;font-weight:bold;">mailboxexists</span> <span style="color:#bf0303;">&quot;bla&quot;</span> {}
<span style="color:#644a9b;">fileinto</span> <span style="color:#006e28;">:create</span> <span style="color:#bf0303;">&quot;inbox.bla&quot;</span>;
<span style="font-weight:bold;">if</span> <span style="color:#644a9b;font-weight:bold;">metadata</span> <span style="color:#0095ff;font-weight:bold;">:is</span> <span style="color:#bf0303;">&quot;INBOX&quot;</span> <span style="color:#bf0303;">&quot;/private/vendor/vendor.isode/auto-replies&quot;</span> <span style="color:#bf0303;">&quot;on&quot;</span> {}
<span style="font-weight:bold;">if</span> <span style="color:#644a9b;font-weight:bold;">metadataexists</span> <span style="color:#bf0303;">&quot;INBOX&quot;</span> <span style="color:#bf0303;">&quot;/private/vendor/foo&quot;</span> {}
<span style="font-weight:bold;">if</span> <span style="color:#644a9b;font-weight:bold;">servermetadata</span> <span style="color:#0095ff;font-weight:bold;">:matches</span> <span style="color:#bf0303;">&quot;/private/vendor/vendor.isode/notification-uri&quot;</span> <span style="color:#bf0303;">&quot;*&quot;</span> {}
<span style="font-weight:bold;">if</span> <span style="color:#644a9b;font-weight:bold;">servermetadataexists</span> <span style="color:#bf0303;">&quot;/private/vendor/foo&quot;</span> {}

<span style="color:#898887;"># Regexp (draft)</span>
<span style="font-weight:bold;">if</span> <span style="color:#644a9b;font-weight:bold;">not</span> <span style="color:#644a9b;font-weight:bold;">address</span> <span style="color:#0095ff;font-weight:bold;">:regex</span> [<span style="color:#bf0303;">&quot;to&quot;</span>, <span style="color:#bf0303;">&quot;cc&quot;</span>, <span style="color:#bf0303;">&quot;bcc&quot;</span>] <span style="color:#bf0303;">&quot;me(</span><span style="color:#924c9d;">\\</span><span style="color:#bf0303;">+.*)?@company</span><span style="color:#924c9d;">\\</span><span style="color:#bf0303;">.com&quot;</span> {}

<span style="color:#898887;"># Relational RFC5231</span>
<span style="font-weight:bold;">if</span> <span style="color:#644a9b;font-weight:bold;">address</span> <span style="color:#0095ff;font-weight:bold;">:count</span> <span style="color:#bf0303;">&quot;ge&quot;</span> <span style="color:#006e28;">:comparator</span> <span style="color:#bf0303;">&quot;i;ascii-numeric&quot;</span> [<span style="color:#bf0303;">&quot;to&quot;</span>, <span style="color:#bf0303;">&quot;cc&quot;</span>] [<span style="color:#bf0303;">&quot;3&quot;</span>] {}
<span style="font-weight:bold;">if</span> <span style="color:#644a9b;font-weight:bold;">header</span> <span style="color:#0095ff;font-weight:bold;">:value</span> <span style="color:#bf0303;">&quot;lt&quot;</span> <span style="color:#006e28;">:comparator</span> <span style="color:#bf0303;">&quot;i;ascii-numeric&quot;</span> [<span style="color:#bf0303;">&quot;x-priority&quot;</span>] [<span style="color:#bf0303;">&quot;3&quot;</span>] {}

<span style="color:#898887;"># Spamtest RFC5235</span>
<span style="font-weight:bold;">if</span> <span style="color:#644a9b;font-weight:bold;">spamtest</span> <span style="color:#0095ff;font-weight:bold;">:value</span> <span style="color:#bf0303;">&quot;eq&quot;</span> <span style="color:#006e28;">:comparator</span> <span style="color:#bf0303;">&quot;i;ascii-numeric&quot;</span> <span style="color:#bf0303;">&quot;0&quot;</span> {}
<span style="font-weight:bold;">elsif</span> <span style="color:#644a9b;font-weight:bold;">spamtest</span> <span style="color:#0095ff;font-weight:bold;">:value</span> <span style="color:#bf0303;">&quot;ge&quot;</span> <span style="color:#006e28;">:comparator</span> <span style="color:#bf0303;">&quot;i;ascii-numeric&quot;</span> <span style="color:#bf0303;">&quot;3&quot;</span> {}
<span style="font-weight:bold;">elsif</span> <span style="color:#644a9b;font-weight:bold;">spamtest</span> <span style="color:#006e28;">:percent</span> <span style="color:#0095ff;font-weight:bold;">:value</span> <span style="color:#bf0303;">&quot;lt&quot;</span> <span style="color:#006e28;">:comparator</span> <span style="color:#bf0303;">&quot;i;ascii-numeric&quot;</span> <span style="color:#bf0303;">&quot;37&quot;</span> {}
<span style="font-weight:bold;">if</span> <span style="color:#644a9b;font-weight:bold;">virustest</span> <span style="color:#0095ff;font-weight:bold;">:value</span> <span style="color:#bf0303;">&quot;eq&quot;</span> <span style="color:#006e28;">:comparator</span> <span style="color:#bf0303;">&quot;i;ascii-numeric&quot;</span> <span style="color:#bf0303;">&quot;4&quot;</span> {}

<span style="color:#898887;"># Subaddress RFC5233</span>
<span style="font-weight:bold;">if</span> <span style="color:#644a9b;font-weight:bold;">envelope</span> <span style="color:#006e28;">:user</span> <span style="color:#bf0303;">&quot;to&quot;</span> <span style="color:#bf0303;">&quot;postmaster&quot;</span> {}
<span style="font-weight:bold;">if</span> <span style="color:#644a9b;font-weight:bold;">envelope</span> <span style="color:#006e28;">:detail</span> <span style="color:#bf0303;">&quot;to&quot;</span> <span style="color:#bf0303;">&quot;mta-filters&quot;</span> {}

<span style="color:#898887;"># Vacation RFC5230</span>
<span style="color:#644a9b;">vacation</span> <span style="color:#bf0303;">&quot;I'm out&quot;</span>;
<span style="color:#644a9b;">vacation</span> <span style="color:#006e28;">:subject</span> <span style="color:#bf0303;">&quot;Automatic response to: </span><span style="color:#0057ae;">${1}</span><span style="color:#bf0303;">&quot;</span>
                  <span style="color:#bf0303;">&quot;I'm away -- send mail to foo in my absence&quot;</span>;
<span style="color:#644a9b;">vacation</span> <span style="color:#006e28;">:handle</span> <span style="color:#bf0303;">&quot;ran-away&quot;</span> <span style="color:#bf0303;">&quot;I'm out&quot;</span>;
<span style="color:#644a9b;">vacation</span> <span style="color:#006e28;">:mime</span> <span style="color:#bf0303;">text:</span>
<span style="color:#bf0303;">   Content-Type: multipart/alternative; boundary=foo</span>

<span style="color:#bf0303;">   --foo</span>

<span style="color:#bf0303;">   Hello </span><span style="color:#0057ae;">${sender}</span><span style="color:#bf0303;">, I'm at the beach relaxing.</span>

<span style="color:#bf0303;">   --foo</span>
<span style="color:#bf0303;">   Content-Type: text/html; charset=us-ascii</span>

<span style="color:#bf0303;">   &lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot;</span>
<span style="color:#bf0303;">    &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;</span>
<span style="color:#bf0303;">   &lt;HTML&gt;&lt;HEAD&gt;&lt;TITLE&gt;How to relax&lt;/TITLE&gt;</span>
<span style="color:#bf0303;">   &lt;BASE HREF=&quot;http://home.example.com/pictures/&quot;&gt;&lt;/HEAD&gt;</span>
<span style="color:#bf0303;">   &lt;BODY&gt;&lt;P&gt;I'm at the &lt;A HREF=&quot;beach.gif&quot;&gt;beach&lt;/A&gt; relaxing.</span>
<span style="color:#bf0303;">   &lt;/BODY&gt;&lt;/HTML&gt;</span>

<span style="color:#bf0303;">   --foo--</span>
<span style="color:#bf0303;">.</span>
;
<span style="color:#644a9b;">vacation</span> <span style="color:#006e28;">:days</span> <span style="color:#b08000;">23</span> <span style="color:#006e28;">:addresses</span> [<span style="color:#bf0303;">&quot;kde@example.edu&quot;</span>] <span style="color:#bf0303;">&quot;I'm away until October 19.&quot;</span>;

<span style="color:#898887;"># Vacation Seconds RFC6131</span>
<span style="color:#644a9b;">vacation</span> <span style="color:#006e28;">:addresses</span> [<span style="color:#bf0303;">&quot;kde@example.edu&quot;</span>] <span style="color:#006e28;">:seconds</span> <span style="color:#b08000;">1800</span>
    <span style="color:#bf0303;">&quot;I am in a meeting, and do not have access to email.&quot;</span>;

<span style="color:#898887;"># Variables RFC5229</span>
<span style="color:#bf0303;">&quot;&amp;%${}!&quot;</span> <span style="color:#898887;"># invalid</span>
<span style="color:#bf0303;">&quot;${doh!}&quot;</span> <span style="color:#898887;">#invalid</span>
<span style="color:#bf0303;">&quot;</span><span style="color:#0057ae;">${company}</span><span style="color:#bf0303;">&quot;</span>
<span style="color:#bf0303;">&quot;bla </span><span style="color:#0057ae;">${var42}</span><span style="color:#bf0303;"> blub&quot;</span>
<span style="color:#bf0303;">&quot;</span><span style="color:#0057ae;">${1}</span><span style="color:#bf0303;">&quot;</span>
<span style="color:#bf0303;">&quot;${BAD</span><span style="color:#0057ae;">${Company}</span><span style="color:#bf0303;">&quot;</span> <span style="color:#898887;"># second one is the variable</span>
<span style="color:#bf0303;">&quot;${President, </span><span style="color:#0057ae;">${Company}</span><span style="color:#bf0303;"> Inc.}&quot;</span> <span style="color:#898887;"># inner one is the variable</span>
<span style="color:#644a9b;">set</span> <span style="color:#bf0303;">&quot;var&quot;</span> <span style="color:#bf0303;">&quot;value&quot;</span>;
<span style="color:#644a9b;">set</span> <span style="color:#bf0303;">&quot;var2&quot;</span> <span style="color:#bf0303;">&quot;</span><span style="color:#0057ae;">${var}</span><span style="color:#bf0303;">&quot;</span>;

<span style="color:#644a9b;">set</span> <span style="color:#bf0303;">&quot;a&quot;</span> <span style="color:#bf0303;">&quot;juMBlEd lETteRS&quot;</span>;
<span style="color:#644a9b;">set</span> <span style="color:#006e28;">:length</span> <span style="color:#bf0303;">&quot;b&quot;</span> <span style="color:#bf0303;">&quot;</span><span style="color:#0057ae;">${a}</span><span style="color:#bf0303;">&quot;</span>;
<span style="color:#644a9b;">set</span> <span style="color:#006e28;">:lower</span> <span style="color:#bf0303;">&quot;b&quot;</span> <span style="color:#bf0303;">&quot;</span><span style="color:#0057ae;">${a}</span><span style="color:#bf0303;">&quot;</span>;
<span style="color:#644a9b;">set</span> <span style="color:#006e28;">:upperfirst</span> <span style="color:#bf0303;">&quot;b&quot;</span> <span style="color:#bf0303;">&quot;</span><span style="color:#0057ae;">${a}</span><span style="color:#bf0303;">&quot;</span>;
<span style="color:#644a9b;">set</span> <span style="color:#006e28;">:upperfirst</span> <span style="color:#006e28;">:lower</span> <span style="color:#bf0303;">&quot;b&quot;</span> <span style="color:#bf0303;">&quot;</span><span style="color:#0057ae;">${a}</span><span style="color:#bf0303;">&quot;</span>;
<span style="color:#644a9b;">set</span> <span style="color:#006e28;">:quotewildcard</span> <span style="color:#bf0303;">&quot;b&quot;</span> <span style="color:#bf0303;">&quot;Rock*&quot;</span>;
<span style="color:#644a9b;">set</span> <span style="color:#006e28;">:lowerfirst</span> <span style="color:#bf0303;">&quot;b&quot;</span> <span style="color:#bf0303;">&quot;</span><span style="color:#0057ae;">${a}</span><span style="color:#bf0303;">&quot;</span>;

<span style="font-weight:bold;">if</span> <span style="color:#644a9b;font-weight:bold;">string</span> <span style="color:#0095ff;font-weight:bold;">:matches</span> <span style="color:#bf0303;">&quot; </span><span style="color:#0057ae;">${state}</span><span style="color:#bf0303;"> &quot;</span> <span style="color:#bf0303;">&quot;* pending *&quot;</span> {}

<span style="color:#898887;"># Dovecot debug extension</span>
<span style="font-weight:bold;">require</span> <span style="color:#bf0303;">&quot;vnd.dovecot.debug&quot;</span>;
<span style="font-weight:bold;">if</span> <span style="color:#644a9b;font-weight:bold;">header</span> <span style="color:#0095ff;font-weight:bold;">:contains</span> <span style="color:#bf0303;">&quot;subject&quot;</span> <span style="color:#bf0303;">&quot;hello&quot;</span> {
    <span style="color:#644a9b;">debug_log</span> <span style="color:#bf0303;">&quot;Subject header contains hello!&quot;</span>;
}
</pre></body></html>
